<!--&lt;!&ndash;<!DOCTYPE html>&ndash;&gt;-->
<!--&lt;!&ndash;<html lang="en"  xmlns:th="http://www.thymeleaf.org">&ndash;&gt;-->
<!--&lt;!&ndash;	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">&ndash;&gt;-->
<!--&lt;!&ndash;	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">&ndash;&gt;-->
<!--&lt;!&ndash;	<title>学生成绩管理系统登录</title>&ndash;&gt;-->
<!--&lt;!&ndash;	&lt;!&ndash; Bootstrap core CSS &ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;	<link href="asserts\css\bootstrap.min.css" th:href="@{/webjars/bootstrap/4.0.0/css/bootstrap.css}" rel="stylesheet">&ndash;&gt;-->
<!--&lt;!&ndash;	&lt;!&ndash; Custom styles for this template &ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;	<link href="asserts/css/login.css" th:href="@{/asserts/css/login.css}" rel="stylesheet">&ndash;&gt;-->

<!--&lt;!&ndash;</head>&ndash;&gt;-->
<!--&lt;!&ndash;<body class="text-center">&ndash;&gt;-->
<!--&lt;!&ndash;	<form id="loginFrom" class="form-signin"  method="post">&ndash;&gt;-->
<!--&lt;!&ndash;&lt;!&ndash;		<img class="mb-4" th:src="@{/asserts/img/bootstrap-solid.svg}" src="asserts/img/bootstrap-solid.svg" alt="" width="72" height="72">&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;		<h1 class="h3 mb-3 font-weight-normal" >请登录</h1>&ndash;&gt;-->

<!--&lt;!&ndash;		&lt;!&ndash;提示框&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;		<div class="alert alert-danger" role="alert" th:if="${msg!=null}">&ndash;&gt;-->
<!--&lt;!&ndash;			<div th:text="${msg}"></div>&ndash;&gt;-->
<!--&lt;!&ndash;		</div>&ndash;&gt;-->


<!--&lt;!&ndash;		<label class="sr-only" >用户名</label>&ndash;&gt;-->
<!--&lt;!&ndash;		<input type="text"  name="username" class="form-control" placeholder="Username"  required="" autofocus="">&ndash;&gt;-->
<!--&lt;!&ndash;		<label class="sr-only ">密码</label>&ndash;&gt;-->
<!--&lt;!&ndash;		<input type="password" name="password" class="form-control" placeholder="Password"  required="">&ndash;&gt;-->

<!--&lt;!&ndash;		<button class="btn btn-lg btn-success btn-block"  th:attr="uri=@{/stu/login}" onclick="send(0)"  id="bt0">学生登录</button>&ndash;&gt;-->
<!--&lt;!&ndash;		<button class="btn btn-lg btn-primary btn-block"  th:attr="uri=@{/tea/login}" onclick="send(1)" id="bt1">教师登录</button>&ndash;&gt;-->
<!--&lt;!&ndash;		<button class="btn btn-lg btn-danger btn-block"   th:attr="uri=@{/adm/login}"  onclick="send(2)" id="bt2">管理员登录</button>&ndash;&gt;-->
<!--&lt;!&ndash;		<p class="mt-5 mb-3 text-muted">202406@重庆工商大学</p>&ndash;&gt;-->

<!--&lt;!&ndash;	</form>&ndash;&gt;-->
<!--&lt;!&ndash;	<script type="text/javascript" src="asserts/js/jquery-3.2.1.slim.min.js" th:src="@{/webjars/jquery/3.3.1/jquery.js}"></script>&ndash;&gt;-->
<!--&lt;!&ndash;	&lt;!&ndash;	<script type="text/javascript" src="asserts/js/popper.min.js" th:src="@{/webjars/popper.js/1.11.1/dist/popper.js}"></script>&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;	<script src="https://unpkg.com/@popperjs/core@2"></script>&ndash;&gt;-->

<!--&lt;!&ndash;	<script type="text/javascript" src="asserts/js/bootstrap.min.js" th:src="@{/webjars/bootstrap/4.0.0/js/bootstrap.js}"></script>&ndash;&gt;-->

<!--&lt;!&ndash;	&lt;!&ndash; Icons &ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash;	<script type="text/javascript" src="asserts/js/feather.min.js" th:src="@{/asserts/js/feather.min.js}"></script>&ndash;&gt;-->

<!--&lt;!&ndash;	<script>&ndash;&gt;-->
<!--&lt;!&ndash;		function send(i)&ndash;&gt;-->
<!--&lt;!&ndash;		{&ndash;&gt;-->

<!--&lt;!&ndash;			if (i===0)&ndash;&gt;-->
<!--&lt;!&ndash;			{&ndash;&gt;-->
<!--&lt;!&ndash;				$("#loginFrom").attr("action", $("#bt0").attr("uri")).submit();&ndash;&gt;-->
<!--&lt;!&ndash;				return false;&ndash;&gt;-->
<!--&lt;!&ndash;			}&ndash;&gt;-->
<!--&lt;!&ndash;			else if(i===1)&ndash;&gt;-->
<!--&lt;!&ndash;			{&ndash;&gt;-->
<!--&lt;!&ndash;				$("#loginFrom").attr("action",$("#bt1").attr("uri")).submit();&ndash;&gt;-->
<!--&lt;!&ndash;				return false;&ndash;&gt;-->
<!--&lt;!&ndash;			}&ndash;&gt;-->
<!--&lt;!&ndash;			else&ndash;&gt;-->
<!--&lt;!&ndash;			{&ndash;&gt;-->
<!--&lt;!&ndash;				$("#loginFrom").attr("action",$("#bt2").attr("uri")).submit();&ndash;&gt;-->
<!--&lt;!&ndash;				return false;&ndash;&gt;-->
<!--&lt;!&ndash;			}&ndash;&gt;-->
<!--&lt;!&ndash;		}&ndash;&gt;-->

<!--&lt;!&ndash;	</script>&ndash;&gt;-->
<!--&lt;!&ndash;</body>&ndash;&gt;-->

<!--&lt;!&ndash;</html>&ndash;&gt;-->


<!--<!DOCTYPE html>-->
<!--<html lang="en" xmlns:th="http://www.thymeleaf.org">-->
<!--<head>-->
<!--	<meta charset="UTF-8">-->
<!--	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">-->
<!--	<title>学生成绩管理系统登录</title>-->
<!--	&lt;!&ndash; Bootstrap core CSS &ndash;&gt;-->
<!--	<link href="/webjars/bootstrap/4.0.0/css/bootstrap.min.css" th:href="@{/webjars/bootstrap/4.0.0/css/bootstrap.min.css}" rel="stylesheet">-->
<!--	&lt;!&ndash; Custom styles for this template &ndash;&gt;-->
<!--	<link href="/asserts/css/login.css" th:href="@{/asserts/css/login.css}" rel="stylesheet">-->
<!--</head>-->
<!--<body class="text-center">-->
<!--	<div class="header" style="padding: 0;">-->
<!--		<h2 style="color: white; width: 400px; height: 60px; line-height: 60px; margin: 0 0 0 30px; padding: 0;">学生成绩管理系统</h2>-->
<!--	</div>-->
<!--	<form id="loginForm" class="form-signin" method="post">-->

<!--		&lt;!&ndash; 提示框 &ndash;&gt;-->
<!--		<div class="alert alert-danger" role="alert" th:if="${msg != null}">-->
<!--			<span th:text="${msg}"></span>-->
<!--		</div>-->

<!--		<label class="sr-only">用户名</label>-->
<!--		<input type="text" name="username" class="form-control" placeholder="Username" required autofocus>-->
<!--		<label class="sr-only">密码</label>-->
<!--		<input type="password" name="password" class="form-control" placeholder="Password" required>-->

<!--		<button class="btn btn-lg btn-success btn-block" th:attr="data-uri=@{/stu/login}" onclick="submitForm(this)">学生登录</button>-->
<!--		<button class="btn btn-lg btn-primary btn-block" th:attr="data-uri=@{/tea/login}" onclick="submitForm(this)">教师登录</button>-->
<!--		<button class="btn btn-lg btn-danger btn-block" th:attr="data-uri=@{/adm/login}" onclick="submitForm(this)">管理员登录</button>-->

<!--	</form>-->
<!--	<div class="footer">202406@重庆工商大学</div>-->

<!--	<script type="text/javascript" src="/webjars/jquery/3.3.1/jquery.min.js" th:src="@{/webjars/jquery/3.3.1/jquery.min.js}"></script>-->
<!--	<script type="text/javascript" src="/webjars/bootstrap/4.0.0/js/bootstrap.bundle.min.js" th:src="@{/webjars/bootstrap/4.0.0/js/bootstrap.bundle.min.js}"></script>-->

<!--	<script>-->
<!--		function submitForm(button) {-->
<!--			var form = document.getElementById("loginForm");-->
<!--			var uri = button.getAttribute("data-uri");-->
<!--			form.setAttribute("action", uri);-->
<!--			form.submit();-->
<!--		}-->
<!--	</script>-->

<!--</body>-->
<!--</html>-->

<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<!--<html lang="en" >-->
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<title>成绩管理系统----登录</title>
	<!-- 自定义title图标 favicon -->
	<link rel="icon" href="/helps/img/favicon.ico" type="image/png">
	<!-- Bootstrap CSS -->
	<link href="/plugins/bootstrap-4.0.0/css/bootstrap.min.css"  rel="stylesheet">
	<!-- 自定义样式 -->
	<link href="/helps/css/login.css"  rel="stylesheet">
	<style>
		.header {
			background-image: url('/helps/img/logo.jpg');
			background-size: 200px 60px; /* 图标的大小 */
			background-repeat: no-repeat;
			padding-left: 220px; /* 留出空间以容纳图标 */
		}
	</style>
</head>
<body>
<div class="header">
<!--	<img src="/helps/img/logo.jpg" alt="Icon" style="width: 200px; height: 60px; margin-right: 10px;">-->
	<h3 style="color: white; width: 300px; height: 60px; line-height: 60px; margin: 0; padding: 0 0 0 30px;">学生成绩管理系统</h3>
</div>

<div class="container">
	<form id="loginForm" class="form-signin" method="post">

		<!-- 提示框 -->
		<div class="alert alert-danger" role="alert" th:if="${msg != null}">
			<span th:text="${msg}"></span>
		</div>

		<div class="input-group">
			<div class="input-group-prepend">
				<span class="input-group-text"><i class="fa fa-user"></i></span>
			</div>
			<input type="text" name="username" class="form-control" placeholder="Username" required autofocus>
		</div>
		<div class="input-group">
			<div class="input-group-prepend">
				<span class="input-group-text"><i class="fa fa-lock"></i></span>
			</div>
			<input type="password" name="password" class="form-control" placeholder="Password" required>
		</div>

		<div class="radio-group">
			<div class="form-check">
				<input class="form-check-input" type="radio" name="loginType" id="studentLogin" value="/stu/login" checked>
				<label class="form-check-label" for="studentLogin">学生</label>
			</div>
			<div class="form-check">
				<input class="form-check-input" type="radio" name="loginType" id="teacherLogin" value="/tea/login">
				<label class="form-check-label" for="teacherLogin">教师</label>
			</div>
			<div class="form-check">
				<input class="form-check-input" type="radio" name="loginType" id="adminLogin" value="/adm/login">
				<label class="form-check-label" for="adminLogin">管理员</label>
			</div>
		</div>

		<button class="btn btn-lg btn-custom btn-block" type="button" onclick="submitForm()">登录</button>

	</form>
</div>
<div class="footer">202406@重庆工商大学</div>
<!--th:src="@{/webjars/jquery/3.3.1/jquery.min.js}"-->
<script type="text/javascript" src="/helps/js/jquery-3.7.1.min.js" ></script>
<!--<script type="text/javascript" src="/asserts/js/jquery-3.7.1.min.js" ></script>-->
<!--th:src="@{/webjars/bootstrap/4.0.0/js/bootstrap.bundle.min.js}"-->
<script type="text/javascript" src="/plugins/bootstrap-4.0.0/js/bootstrap.min.js" ></script>
<!--<script type="text/javascript" src="/plugins/bootstrap-4.6.2/js/bootstrap.bundle.min.js" ></script>-->
<script src="https://use.fontawesome.com/releases/v5.15.4/js/all.js" crossorigin="anonymous"></script>

<script>
	function submitForm() {
		var form = document.getElementById("loginForm");
		var selectedLoginType = document.querySelector('input[name="loginType"]:checked').value;
		form.setAttribute("action", selectedLoginType);
		form.submit();
	}
</script>

</body>
</html>
